home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 August / CICA - The Ultimate Collection of Shareware for Windows (Disc 2) (August 1995).iso / disc2 / nt / c320nt.exe / OEMSETUP.INF < prev   
INI File  |  1994-01-17  |  35KB  |  805 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     EISA
  5. [LanguagesSupported]
  6.     ENG
  7. [Options]
  8.     CresNT
  9. [OptionsTextENG]
  10.     CresNT   = "Cisco CDDI/FDDI EISA Adapter"
  11. [FileConstants]
  12. UtilityInf      = "UTILITY.INF"
  13. subroutineinf   = "SUBROUTN.INF"
  14. SoftwareType    = "driver"
  15. Exit_Code       = 0
  16. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  17. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  18. COMPRESSEDID_MASK = 4294967295
  19. C320_EISA_ID  = 53629710
  20. C320T_EISA_ID = 70406926
  21. Manufacturer    = "Microsoft"
  22. ProductMajorVersion     = "3"
  23. ProductMinorVersion     = "1"
  24. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  25. ThisInfFileName = ""
  26. [GeneralConstants]
  27. from      = ""
  28. to        = ""
  29. ExitCodeOk     = 0
  30. ExitCodeCancel = 1
  31. ExitCodeFatal  = 2
  32. KeyNull         = ""
  33. MAXIMUM_ALLOWED   = 33554432
  34. RegistryErrorIndex = NO_ERROR
  35. KeyProduct      = ""
  36. KeyParameters   = ""
  37. TRUE            = 1
  38. FALSE           = 0
  39. NoTitle            = 0
  40. ExitState   = "Active"
  41. OldVersionC320NTExisted = $(FALSE)
  42. OldVersionC320TNTExisted = $(FALSE)
  43. DriverPath      = $(!STF_NTPATH)\drivers
  44. [FileConstantsENG]
  45. ProCaption   = "Windows NT Setup"
  46. ProCancel    = "Cancel"
  47. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  48.                "Are you sure you want to cancel copying files?"
  49. ProCancelCap = "Network Setup Message"
  50. ProText1     = "Copying:"
  51. ProText2     = "To:"
  52. FunctionTitle   = "Cisco CDDI/FDDI EISA Adapter Setup"
  53. ProductSoftwareC320NTDescription      = "Cisco CDDI/FDDI EISA Driver"
  54. ProductHardwareC320NTDescription      = "Cisco CDDI/FDDI EISA Adapter"
  55. ProductSoftwareC320NTName     = "c320nt"
  56. ProductSoftwareC320NTTitle    = "Cisco CDDI/FDDI EISA Driver"
  57. ProductSoftwareC320NTImagePath = "\SystemRoot\System32\drivers\c320nt.sys"
  58. NetRuleSoftwareC320NTType     = "c320ntSys ndisDriver c320ntDriver"
  59. NetRuleSoftwareC320NTUse      = $(SoftwareType)
  60. NetRuleSoftwareC320NTBindForm = """c320ntSys"" yes no container"
  61. NetRuleSoftwareC320NTClass    = {"c320ntDriver basic"}
  62. NetRuleSoftwareC320NTBindable = {"c320ntDriver c320ntAdapter non exclusive 100"}
  63. ProductHardwareC320NTName     = "C320NT"
  64. ProductHardwareC320NTTitle    = "Cisco CDDI/FDDI EISA Adapter"
  65. NetRuleHardwareC320NTType     = "c320nt c320ntAdapter"
  66. NetRuleHardwareC320NTBindForm = " yes yes container"
  67. NetRuleHardwareC320NTClass    = {"c320ntAdapter basic"}
  68. ProductKeyC320NTName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareC320NTName)"\CurrentVersion"
  69. ParamKeyC320NTName    = $(!NTN_ServiceBase)$(ProductHardwareC320NTName)"\Parameters"
  70. ; Turbo Adapter defines
  71. ProductSoftwareC320TNTDescription      = "Cisco CDDI/FDDI EISA Driver"
  72. ProductHardwareC320TNTDescription      = "Cisco CDDI/FDDI EISA Adapter"
  73. ProductSoftwareC320TNTName     = "c320tnt"
  74. ProductSoftwareC320TNTTitle    = "Cisco CDDI/FDDI EISA Driver"
  75. ProductSoftwareC320TNTImagePath = "\SystemRoot\System32\drivers\c320tnt.sys"
  76. NetRuleSoftwareC320TNTType     = "c320tntSys ndisDriver c320tntDriver"
  77. NetRuleSoftwareC320TNTUse      = $(SoftwareType)
  78. NetRuleSoftwareC320TNTBindForm = """c320tntSys"" yes no container"
  79. NetRuleSoftwareC320TNTClass    = {"c320tntDriver basic"}
  80. NetRuleSoftwareC320TNTBindable = {"c320tntDriver c320tntAdapter non exclusive 100"}
  81. ProductHardwareC320TNTName     = "C320TNT"
  82. ProductHardwareC320TNTTitle    = "Cisco CDDI/FDDI EISA Adapter"
  83. NetRuleHardwareC320TNTType     = "c320tnt c320tntAdapter"
  84. NetRuleHardwareC320TNTBindForm = " yes yes container"
  85. NetRuleHardwareC320TNTClass    = {"c320tntAdapter basic"}
  86. ProductKeyC320TNTName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareC320TNTName)"\CurrentVersion"
  87. ParamKeyC320TNTName    = $(!NTN_ServiceBase)$(ProductHardwareC320TNTName)"\Parameters"
  88. [DialogConstantsENG]
  89. Help        = "&Help"
  90. Exit        = "Cancel"
  91. OK          = "OK"
  92. HelpContext = ""
  93. Continue    = "Continue"
  94. Cancel      = "Cancel"
  95. [date]
  96.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  97. [Identify]
  98.     read-syms Identification
  99.     set Status     = STATUS_SUCCESSFUL
  100.     set Identifier = $(OptionType)
  101.     set Media      = #("Source Media Descriptions", 1, 1)
  102.     Return $(Status) $(Identifier) $(Media)
  103. [ReturnOptions]
  104.     set Status        = STATUS_FAILED
  105.     set OptionList     = {}
  106.     set OptionTextList = {}
  107.     set LanguageList = ^(LanguagesSupported, 1)
  108.     Ifcontains(i) $($0) in $(LanguageList)
  109.         ifstr(i) $($1) == ""
  110.            goto returnoptions
  111.         endif
  112.         set PlatformList = ^(PlatformsSupported, 1)
  113.         Ifcontains(i) $($1) in $(PlatformList)
  114.            goto returnoptions
  115.         else
  116.            set Status = STATUS_NOTSUPPORTED
  117.            goto finish_ReturnOptions
  118.         endif
  119.     else
  120.         set Status = STATUS_NOLANGUAGE
  121.         goto finish_ReturnOptions
  122.     endif
  123. returnoptions = +
  124.     set OptionList     = ^(Options, 1)
  125.     set OptionTextList = ^(OptionsText$($0), 1)
  126.     set Status         = STATUS_SUCCESSFUL
  127. finish_ReturnOptions = +
  128.     Return $(Status) $(OptionList) $(OptionTextList)
  129. [InstallOption]
  130.     set Option   = $($1)
  131.     set SrcDir   = $($2)
  132.     set AddCopy  = $($3)
  133.     set DoCopy   = $($4)
  134.     set DoConfig = $($5)
  135.     set LanguageList = ^(LanguagesSupported, 1)
  136.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  137.         Return STATUS_NOLANGUAGE
  138.     endif
  139.     set-subst LF = "\n"
  140.     read-syms GeneralConstants
  141.     read-syms FileConstants
  142.     read-syms DialogConstants$(!STF_LANGUAGE)
  143.     ifstr(i) $(!NTN_Origination) == "NCPA"
  144.         set Continue = "OK"
  145.     endif
  146.     read-syms FileConstants$(!STF_LANGUAGE)
  147.     detect date
  148.     set-title  $(FunctionTitle)
  149.     set to   = Begin
  150.     set from = Begin
  151.     set CommonStatus = STATUS_SUCCESSFUL
  152. ; Get my INF Filename
  153.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  154.     Ifstr $(KeyProduct) != $(KeyNull)
  155.         Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  156.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  157.             CloseRegKey $(KeyProduct)
  158.             Debug-Output " ShellCode error"
  159.             goto ShellCodeError
  160.         endif
  161.         CloseRegKey $(KeyProduct)
  162.         set ThisInfFileName = $($R0)
  163.     else
  164.         set ThisInfFileName = CRES
  165.     endif
  166.     EndWait
  167. Begin = +
  168.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  169.         set StartLabel = removeadapter
  170.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  171.         set StartLabel = UpgradeSoftware
  172.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  173.         set StartLabel = bindingadapter
  174.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  175.         set CommonStatus = STATUS_REBOOT
  176.         Debug-Output $(ThisInfFileName)" Configure: Product Key Name is "$(ProductKeyName)" NTN_RegBase is "$(!NTN_RegBase)
  177.         Ifstr(i) $(ProductKeyC320NTName) == $(!NTN_RegBase)
  178.             Debug-Output $(ThisInfFileName)" Cannot configure the CresNT driver software."
  179.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  180.         else-Ifstr(i) $(ProductKeyC320TNTName) == $(!NTN_RegBase)
  181.             Debug-Output $(ThisInfFileName)" Cannot configure the CresNT driver software."
  182.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  183.         else
  184.             Debug-Output $(ThisInfFileName)" Cannot configure the CresNT adapter card."
  185.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_HARDWARE
  186.         endif
  187.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  188.             Debug-Output $(ThisInfFileName)" ShellCode error: cannot get an error string."
  189.             goto ShellCodeError
  190.         endif
  191.         set Error = $($R0)
  192.         set from = end
  193.         set to = end
  194.         goto nonfatalinfo
  195.     else
  196.         set StartLabel = installadapter
  197.         set OEM_ABANDON_HW_OPTIONS = {}
  198.         set OEM_ABANDON_SW_OPTIONS = {}
  199.         set OEM_ABANDON_ON = TRUE
  200.     endif
  201.     set from = $(fatal)
  202.     set to = $(fatal)
  203.     Debug-Output $(ThisInfFileName)" =================================================="
  204.     Debug-Output $(ThisInfFileName)" STF_CWDIR is: "$(!STF_CWDIR)
  205.     Debug-Output $(ThisInfFileName)" Selected Option is: "$(Option)
  206.     Debug-Output $(ThisInfFileName)" =================================================="
  207.     goto $(StartLabel)
  208. installadapter = +
  209.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyC320NTName) $(MAXIMUM_ALLOWED) KeyProduct
  210.     Ifstr $(KeyProduct) != $(KeyNull)
  211.         Debug-Output $(ThisInfFileName)" Opened Product Key for "$(ProductKeyC320NTName)
  212.         CloseRegKey $(KeyProduct)
  213.         ifstr(i) !(NTN_RegBase) == $(ProductKeyC320NTName)
  214.             Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareC320NTTitle),+
  215.                 $(ProductVersion)
  216.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  217.                 Debug-Output $(ThisInfFileName)" ShellCode error: cannot get an error string."
  218.                 goto ShellCodeError
  219.             endif
  220.             goto end
  221.         endif
  222.         set OldVersionC320NTExisted = $(TRUE)
  223.     endif
  224.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyC320TNTName) $(MAXIMUM_ALLOWED) KeyProduct
  225.     Ifstr $(KeyProduct) != $(KeyNull)
  226.         Debug-Output $(ThisInfFileName)" Opened Product Key for "$(ProductKeyC320TNTName)
  227.         CloseRegKey $(KeyProduct)
  228.         ifstr(i) !(NTN_RegBase) == $(ProductKeyC320TNTName)
  229.             Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareC320TNTTitle),+
  230.                 $(ProductVersion)
  231.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  232.                 Debug-Output $(ThisInfFileName)" ShellCode error: cannot get an error string."
  233.                 goto ShellCodeError
  234.             endif
  235.             goto end
  236.         endif
  237.         set OldVersionC320TNTExisted = $(TRUE)
  238.     endif
  239.     goto nextstep
  240. configureadapter = +
  241.     set Error = "Configure: Sorry not yet implemented."
  242.     goto fatal
  243. nextstep = +
  244.     StartWait
  245. installproduct = +
  246.     Debug-Output $(ThisInfFileName)" Installing product, Shelling to find Cisco EISA Adapters"
  247.     Shell $(UtilityInf), EISAFindBus, $(C320_EISA_ID) $(COMPRESSEDID_MASK)
  248.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  249.         goto ShellCodeError
  250.     endif
  251.     ifstr $($R0) != "NO_ERROR"
  252.         set Error = $($R0)
  253.         goto fatal
  254.     endif
  255.     set CardInfo = {}
  256.     ifstr(i) $($R1) != {}
  257.         set CardInfo = $($R1)
  258.     endif
  259.     Debug-Output $(ThisInfFileName)" Shelling to find Cisco EISA Adapters"
  260.     Shell $(UtilityInf), EISAFindBus, $(C320T_EISA_ID) $(COMPRESSEDID_MASK)
  261.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  262.         goto ShellCodeError
  263.     endif
  264.     ifstr $($R0) != "NO_ERROR"
  265.         set Error = $($R0)
  266.         goto fatal
  267.     endif
  268.     ifstr(i) $($R1) != {}
  269.         ifstr(i) $(CardInfo) != {}
  270.             ForListDo $($R1)
  271.                 set CardInfo = >($(CardInfo), $($))
  272.             EndForListDo
  273.         else
  274.             set CardInfo = $($R1)
  275.         endif
  276.     endif
  277.     ifstr(i) $(CardInfo) == {}
  278.         Debug-Output $(ThisInfFileName)" Cannot find any card"
  279.         set Error = $(CANNOT_FIND_ANY_CARD)
  280.         set CommonStatus = STATUS_USERCANCEL
  281.         set from = "end"
  282.         goto nonfatal
  283.     endif
  284.     Debug-Output $(ThisInfFileName)" Card Information: "$(CardInfo)
  285.     set AdapterList = $(CardInfo)
  286.     set C320Present = $(FALSE)
  287.     set C320TPresent = $(FALSE)
  288.     ForListDo $(AdapterList)
  289.         set EISAId = *($($),3)
  290.         ifint $(EISAId) == $(C320_EISA_ID)
  291.             set C320NTPresent = $(TRUE)
  292.             Debug-Output $(ThisInfFileName)" EISA Rev 3 Adapter present"
  293.         endif
  294.         ifint $(EISAId) == $(C320T_EISA_ID)
  295.             set C320TNTPresent = $(TRUE)
  296.             Debug-Output $(ThisInfFileName)" EISA Adapter present"
  297.         endif
  298.     EndForListDo
  299. ; INSTALLING SOFTWARE COMPONENTS
  300.     ForListDo $(AdapterList)
  301.         set EISAId = *($($),3)
  302.         ifint $(EISAId) == $(C320_EISA_ID)
  303.             set Option = C320NT
  304.         else-Ifint $(EISAId) == $(C320T_EISA_ID)
  305.             set Option = C320TNT
  306.         else
  307.             goto fatal
  308.         endif
  309.         ifint $($(Option)Present) == $(TRUE)
  310.             ifint $(OldVersion$(Option)Existed) == $(FALSE)
  311.                 Ifstr(i) $(DoCopy) == "YES"
  312.                    Debug-Output $(ThisInfFileName)" Verifying source directories for "$(Option)
  313.                    Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  314.                    Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  315.                         Goto ShellCodeError
  316.                    Else-Ifstr(i) $($R0) == STATUS_FAILED
  317.                        Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  318.                        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  319.                           goto ShellCodeError
  320.                        endif
  321.                        set Error = $($R0)
  322.                        Goto fatal
  323.                    Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  324.                        Goto successful
  325.                    Endif
  326.                    Set SrcDir = $($R1)
  327.                 Endif
  328.                 Debug-Output $(ThisInfFileName)" Copying files for "$(Option)" driver, SrcDir: "$(SrcDir)
  329.                 install "Install-Option"
  330.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  331.                     Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  332.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  333.                        goto ShellCodeError
  334.                     endif
  335.                     set Error = $($R0)
  336.                     goto fatal
  337.                 endif
  338.                 Debug-Output $(ThisInfFileName)" Adding S/W Component in Registry for "$(Option)
  339.                 Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  340.                         $(ProductSoftware$(Option)Name), +
  341.                         $(ProductSoftware$(Option)Name), +
  342.                         $(ProductSoftware$(Option)Title), $(STF_CONTEXTINFNAME), +
  343.                         $(ProductSoftware$(Option)ImagePath), "kernel", "NDIS", {}, "",+
  344.                         $(NetEventDLL)
  345.                 Set OEM_ABANDON_SW_OPTIONS = >($(OEM_ABANDON_SW_OPTIONS), $(ProductSoftware$(Option)Name))
  346.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  347.                     Debug-Output $(ThisInfFileName)" ShellCode error"
  348.                     goto ShellCodeError
  349.                 endif
  350.                 set RegistryErrorIndex = $($R0)
  351.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  352.                     EndWait
  353.                     Debug-Output $(ThisInfFileName)" Registry error: add software components"
  354.                     CloseRegKey $($R1)
  355.                     CloseRegKey $($R2)
  356.                     CloseRegKey $($R3)
  357.                     CloseRegKey $($R4)
  358.                     CloseRegKey $($R5)
  359.                     goto fatalregistry
  360.                 endif
  361.                 set OldVersion$(Option)Existed = $(TRUE)
  362.                 set SoftProductKey      = $($R1)
  363.                 Set SoftNetRuleKey      = $($R2)
  364.                 Set SoftServiceKey      = $($R3)
  365.                 Set SoftParameterKey    = $($R4)
  366.                 Set SoftLinkageKey      = $($R5)
  367.                 set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  368.                                    {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  369.                                    {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  370.                                    {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Title)},+
  371.                                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Description)},+
  372.                                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Name)},+
  373.                                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  374.                 Debug-Output $(ThisInfFileName)" Adding value to S/W Product key for "$(Option)
  375.                 Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  376.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  377.                     Debug-Output $(ThisInfFileName)" ShellCode error."
  378.                     goto ShellCodeError
  379.                 endif
  380.                 set RegistryErrorIndex = $($R0)
  381.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  382.                     EndWait
  383.                     Debug-Output $(ThisInfFileName)" Registry error: add value list"
  384.                     CloseRegKey $(SoftProductKey)
  385.                     CloseRegKey $(SoftNetRuleKey)
  386.                     CloseRegKey $(SoftServiceKey)
  387.                     CloseRegKey $(SoftParameterKey)
  388.                     CloseRegKey $(SoftLinkageKey)
  389.                     goto fatalregistry
  390.                 endif
  391.                 set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftware$(Option)Type)},+
  392.                                     {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftware$(Option)Use)}, +
  393.                                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftware$(Option)BindForm)}, +
  394.                                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftware$(Option)Class)}, +
  395.                                     {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftware$(Option)Bindable)}, +
  396.                                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  397.                 Debug-Output $(ThisInfFileName)" Adding value to S/W NetRule key for "$(Option)
  398.                 Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  399.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  400.                     Debug-Output $(ThisInfFileName)" ShellCode error."
  401.                     goto ShellCodeError
  402.                 endif
  403.                 set RegistryErrorIndex = $($R0)
  404.                 CloseRegKey $(SoftProductKey)
  405.                 CloseRegKey $(SoftNetRuleKey)
  406.                 CloseRegKey $(SoftServiceKey)
  407.                 CloseRegKey $(SoftParameterKey)
  408.                 CloseRegKey $(SoftLinkageKey)
  409.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  410.                     EndWait
  411.                     Debug-Output $(ThisInfFileName)" Registry error: add value list."
  412.                     goto fatalregistry
  413.                 endif
  414.             else
  415.                 Debug-Output $(ThisInfFileName)" S/W for "$(Option)" already exists, not re-installing"
  416.             endif
  417.         endif
  418.     EndForListDo
  419. ; INSTALLING HARDWARE COMPONENTS
  420.     ForListDo $(AdapterList)
  421.         set BusNum = *($($),1)
  422.         set SlotNum = *($($),2)
  423.         set EISAId = *($($),3)
  424.         ifint $(EISAId) == $(C320_EISA_ID)
  425.             set Option = C320NT
  426.         else-Ifint $(EISAId) == $(C320T_EISA_ID)
  427.             set Option = C320TNT
  428.         else
  429.             goto fatal
  430.         endif
  431.         Debug-Output $(ThisInfFileName)" Bus: "$(BusNum)" Slot: "$(SlotNum)" EISAID: "$(EISAId)" Option: "$(Option)
  432.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  433.             $(SlotNum), $(ProductHardware$(Option)Description), $(ProductHardware$(Option)Name)
  434.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  435.             goto ShellCodeError
  436.         endif
  437.         ifstr $($R0) != "NO_ERROR"
  438.             set Error = $($R0)
  439.             goto fatal
  440.         endif
  441.         ifstr(i) $($R1) != "YES"
  442.             Debug-Output $(ThisInfFileName)" Adding H/W Component "$(Option)" Slot: "$(SlotNum)
  443.             Shell $(UtilityInf), AddHardwareComponent,$(ProductHardware$(Option)Name),$(STF_CONTEXTINFNAME),$(ProductKey$(Option)Name)
  444.             ifint $($R4) != -1
  445.                 Set OEM_ABANDON_HW_OPTIONS = >($(OEM_ABANDON_HW_OPTIONS), {$(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4),$(ProductSoftware$(Option)Name)})
  446.             endif
  447.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  448.                 Debug-Output $(ThisInfFileName)" Cannot add hardware component"
  449.                 goto ShellCodeError
  450.             endif
  451.             set RegistryErrorIndex = $($R0)
  452.             Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  453.                 EndWait
  454.                 Debug-Output $(ThisInfFileName)" Registry error: add hardware component"
  455.                 Debug-Output $(ThisInfFileName)" Registry Error Index: "$(RegistryErrorIndex)
  456.                 CloseRegKey $($R1)
  457.                 CloseRegKey $($R2)
  458.                 CloseRegKey $($R3)
  459.                 goto fatalregistry
  460.             endif
  461.             set KeyAdapter = $($R1)
  462.             set KeyAdapterRules = $($R2)
  463.             set KeyAdapterParameters = $($R3)
  464.             set AdapterNumber = $($R4)
  465.             set NewValueList =  {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  466.                                 {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  467.                                 {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  468.                                 {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Name)},+
  469.                                 {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  470.                                 {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  471.             Debug-Output $(ThisInfFileName)" Adding H/W Component Value"
  472.             Shell  $(UtilityInf), AddValueList, $(KeyAdapter), $(NewValueList)
  473.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  474.                 Debug-Output $(ThisInfFileName)" ShellCode error"
  475.                 goto ShellCodeError
  476.             endif
  477.             Shell $(UtilityInf), GetBusTypeNum
  478.             set BusTypeNum = $($R1)
  479.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  480.                 Debug-Output $(ThisInfFileName)" ShellCode error."
  481.                 goto ShellCodeError
  482.             endif
  483.             set NewValueList = {+
  484.                                {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  485.                                {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  486.                                {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  487.                                {CardType,$(NoTitle),$(!REG_VT_DWORD),$(CardTypeValue)},+
  488.                                {TransmitQDepth,$(NoTitle),$(!REG_VT_DWORD),20},+
  489.                                {ReceiveBuffers,$(NoTitle),$(!REG_VT_DWORD),32},+
  490.                                {BurstSize,$(NoTitle),$(!REG_VT_DWORD),63}+
  491.                                }
  492.             Debug-Output $(ThisInfFileName)" Adding H/W Component parameters"
  493.             Shell  $(UtilityInf), AddValueList, $(KeyAdapterParameters), $(NewValueList)
  494.             CloseRegKey $(KeyParameters)
  495.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  496.                 Debug-Output $(ThisInfFileName)" ShellCode error."
  497.                 goto ShellCodeError
  498.             endif
  499.             set TempProdName = """"$(ProductHardware$(Option)Name)$(AdapterNumber)""""
  500.             set TempBindForm = $(TempProdName)$(NetRuleHardware$(Option)BindForm)
  501.             set NewValueList =  {+
  502.                                 {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  503.                                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)},+
  504.                                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)},+
  505.                                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}+
  506.                                 }
  507.             Debug-Output $(ThisInfFileName)" Adding H/W Component rules"
  508.             Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  509.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  510.                 Debug-Output $(ThisInfFileName)" ShellCode error."
  511.                 goto ShellCodeError
  512.             endif
  513.             CloseRegKey $(KeyAdapter)
  514.             CloseRegKey $(KeyAdapterParameters)
  515.             CloseRegKey $(KeyAdapterRules)
  516.         else
  517.             Debug-Output $(ThisInfFileName)" Adapter already installed in Slot: "$(SlotNum)
  518.         endif
  519.     EndForListDo
  520.     goto writeparameters
  521. writeparameters = +
  522.     EndWait
  523.     goto successful
  524. bindingadapter =+
  525.     set Error = "Binding: Sorry, not yet implemented."
  526.     goto fatal
  527. removeadapter = +
  528.     Ifstr(i) $(ProductKeyC320NTName) == $(!NTN_RegBase)
  529.         Debug-Output $(ThisInfFileName)" removing S/W component C320NT"
  530.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  531.             $(ProductSoftwareC320NTName)
  532.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  533.             Debug-Output $(ThisInfFileName)" ShellCode error"
  534.             goto ShellCodeError
  535.         endif
  536.         set RegistryErrorIndex = $($R0)
  537.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  538.             goto fatalregistry
  539.         endif
  540.     else-Ifstr(i) $(ProductKeyC320TNTName) == $(!NTN_RegBase)
  541.         Debug-Output $(ThisInfFileName)" removing S/W component C320TNT"
  542.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  543.             $(ProductSoftwareC320TNTName)
  544.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  545.             Debug-Output $(ThisInfFileName)" ShellCode error"
  546.             goto ShellCodeError
  547.         endif
  548.         set RegistryErrorIndex = $($R0)
  549.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  550.             goto fatalregistry
  551.         endif
  552.     else
  553.         Debug-Output $(ThisInfFileName)" Opening NTN_RegBase = "$(!NTN_RegBase)
  554.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) NetAdapterKey
  555.         Ifstr $(NetAdapterKey) == $(KeyNull)
  556.             Debug-Output $(ThisInfFileName)" Could not open Adapter key"
  557.             goto fatalregistry
  558.         else
  559.             GetRegValue $(NetAdapterKey), "ServiceName", ServiceNameInfo
  560.             set ServiceName = *($(ServiceNameInfo), 4)
  561.             Debug-Output $(ThisInfFileName)" ServiceName in NTN_RegBase is "$(ServiceName)
  562.             GetRegValue $(NetAdapterKey), "ProductName", ProductNameInfo
  563.             set Option = *($(ProductNameInfo), 4)
  564.             Debug-Output $(ThisInfFileName)" ProductName in NTN_RegBase is "$(Option)
  565.             CloseRegKey $(NetAdapterKey)
  566.             ifstr(i) $(ServiceName) != ""
  567.                 Debug-Output $(ThisInfFileName)" Removing "$(Option)" H/W"
  568.                 Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  569.                     $(ProductSoftware$(Option)Name), $(!NTN_RegBase)
  570.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  571.                     Debug-Output $(ThisInfFileName)" ShellCode error"
  572.                     goto ShellCodeError
  573.                 endif
  574.                 set RegistryErrorIndex = $($R0)
  575.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  576.                     goto fatalregistry
  577.                 endif
  578.              endif
  579.         endif
  580.     endif
  581.     goto end
  582. UpgradeSoftware = +
  583.     ifstr(i) $(ProductKeyC320NTName) == $(!NTN_RegBase)
  584.         set Option = C320NT
  585.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyC320NTName) $(MAXIMUM_ALLOWED) KeyProduct
  586.         Ifstr $(KeyProduct) != $(KeyNull)
  587.             Debug-Output $(ThisInfFileName)" Upgrading C320NT S/W"
  588.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  589.             set Version = *($(VersionInfo), 4)
  590.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  591.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  592.                 Debug-Output $(ThisInfFileName)" ShellCode error"
  593.                 goto ShellCodeError
  594.             endif
  595.             set !UG_Filename = $($R0)
  596.             ifstr(i) $(!UG_Filename) != ""
  597.                 Debug-Output $(ThisInfFileName)" Copying C320NT sys & inf files for C320NT"
  598.                 install "Install-Update"
  599.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  600.                     goto fatal
  601.                 endif
  602.             endif
  603.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  604.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  605.             ifint $(Version) != $(ProductVersion)
  606.             endif
  607.             CloseRegKey $(KeyProduct)
  608.         else
  609.             goto fatalregistry
  610.         endif
  611.     else-Ifstr(i) $(ProductKeyC320TNTName) == $(!NTN_RegBase)
  612.         set Option = C320TNT
  613.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyC320TTName) $(MAXIMUM_ALLOWED) KeyProduct
  614.         Ifstr $(KeyProduct) != $(KeyNull)
  615.             Debug-Output $(ThisInfFileName)" Upgrading C320TNT S/W"
  616.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  617.             set Version = *($(VersionInfo), 4)
  618.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  619.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  620.                 Debug-Output $(ThisInfFileName)" ShellCode error"
  621.                 goto ShellCodeError
  622.             endif
  623.             set !UG_Filename = $($R0)
  624.             ifstr(i) $(!UG_Filename) != ""
  625.                 Debug-Output $(ThisInfFileName)" Copying C320TNT sys & inf files"
  626.                 install "Install-Update"
  627.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  628.                     goto fatal
  629.                 endif
  630.             endif
  631.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  632.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  633.             ifint $(Version) != $(ProductVersion)
  634.             endif
  635.             CloseRegKey $(KeyProduct)
  636.         else
  637.             goto fatalregistry
  638.         endif
  639.     else
  640.         Debug-Output $(ThisInfFileName)" H/W upgrade requested, just make sure the H/W component exists"
  641.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) NetworkCardKey
  642.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  643.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  644.             set ServiceName = *($(ServiceNameInfo), 4)
  645.             OpenRegKey $(NetworkCardKey) "" "NetRules" $(MAXIMUM_ALLOWED) NetRuleKey
  646.             Ifstr(i) $(NetRuleKey) != $(KeyNull)
  647.             else
  648.                 goto fatalregistry
  649.             endif
  650.             CloseRegKey $(NetRules)
  651.             CloseRegKey $(NetworkCardKey)
  652.         else
  653.             goto fatalregistry
  654.         endif
  655.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName) +
  656.               $(MAXIMUM_ALLOWED) ServiceKey
  657.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  658.             Debug-Output $(ThisInfFileName)" Service "$(ServiceName)" exists"
  659.             CloseRegKey $(ServiceKey)
  660.         else
  661.             goto fatalregistry
  662.         endif
  663.     endif
  664.     goto end
  665. successful = +
  666.     goto end
  667. abandon = +
  668.     ForListDo $(OEM_ABANDON_HW_OPTIONS)
  669.         Debug-Output $(ThisInfFileName)" H/W Abandon: Component: "*($($),1)" S/W Name: "*($($),2)
  670.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  671.             *($($),2), *($($),1)
  672.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  673.             Debug-Output $(ThisInfFileName)" ShellCode error"
  674.             goto ShellCodeError
  675.         endif
  676.         set RegistryErrorIndex = $($R0)
  677.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  678.             goto fatalregistry
  679.         endif
  680.     EndForListDo
  681.     ForListDo $(OEM_ABANDON_SW_OPTIONS)
  682.         Debug-Output $(ThisInfFileName)" S/W Abandon: Component: "$($)
  683.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  684.             $($), FALSE
  685.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  686.             Debug-Output $(ThisInfFileName)" ShellCode error"
  687.             goto ShellCodeError
  688.         endif
  689.         set RegistryErrorIndex = $($R0)
  690.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  691.             goto fatalregistry
  692.         endif
  693.     EndForListDo
  694.     goto end
  695. warning = +
  696.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  697.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  698.         goto ShellCodeError
  699.     endif
  700.     ifstr(i) $($R1) == "OK"
  701.         goto $(to)
  702.     else-ifstr(i) $($R1) == "CANCEL"
  703.         goto $(from)
  704.     else
  705.         goto "end"
  706.     endif
  707. nonfatalinfo = +
  708.     Set CommonStatus = STATUS_USERCANCEL
  709.     Set Severity = STATUS
  710.     goto nonfatalmsg
  711. nonfatal = +
  712.     Set Severity = NONFATAL
  713.     goto nonfatalmsg
  714. nonfatalmsg = +
  715.     ifstr(i) $(Error) == ""
  716.         Set Severity = NONFATAL
  717.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  718.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  719.             goto ShellCodeError
  720.         endif
  721.         set Error = $($R0)
  722.     endif
  723.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  724.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  725.         goto ShellCodeError
  726.     endif
  727.     ifstr(i) $($R1) == "OK"
  728.         goto $(from)
  729.     else
  730.         goto "end"
  731.     endif
  732. fatalregistry = +
  733.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  734.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  735.         goto ShellCodeError
  736.     endif
  737.     set Error = $($R0)
  738.     goto fatal
  739. fatal = +
  740.     ifstr(i) $(Error) == ""
  741.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  742.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  743.             goto ShellCodeError
  744.         endif
  745.         set Error = $($R0)
  746.     endif
  747.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  748.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  749.         goto ShellCodeError
  750.     endif
  751.     goto setfailed
  752. ShellCodeError = +
  753.     set DlgType      = "MessageBox"
  754.     set STF_MB_TITLE = "Error: "$(FunctionTitle)
  755.     set STF_MB_TEXT  = "Shell Code Error"
  756.     set STF_MB_TYPE  = 1
  757.     set STF_MB_ICON  = 3
  758.     set STF_MB_DEF   = 1
  759.     ui start "Error Message"
  760.     goto setfailed
  761. setfailed = +
  762.     set CommonStatus = STATUS_FAILED
  763.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  764.         set OEM_ABANDON_ON = FALSE
  765.         goto abandon
  766.     endif
  767.     goto end
  768. end = +
  769.     goto term
  770. term = +
  771.     Return $(CommonStatus)
  772. [Install-Option]
  773.     set STF_VITAL = ""
  774.     ifstr(i) $(AddCopy) == "YES"
  775.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  776.     endif
  777.     ifstr(i) $(DoCopy) == "YES"
  778.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  779.        CopyFilesInCopyList
  780.     endif
  781.     ifstr(i) $(DoConfig) == "YES"
  782.     endif
  783.     Exit
  784. [Install-Update]
  785.    set STF_VITAL        = ""
  786.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  787.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  788.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  789.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  790.    CopyFilesInCopyList
  791.    exit
  792. [Source Media Descriptions]
  793.     1  = "Cisco EISA Driver Disk"  , TAGFILE = disk1
  794.     2  = "Windows NT Setup CD-ROM Disk"  , TAGFILE = disk2
  795.     99  = "LMHOST disk", TAGFILE = lmhosts
  796. [ProductType]
  797. STF_PRODUCT  = Winnt
  798. STF_PLATFORM = I386
  799. [Files-Inf]
  800. 1,oemsetup.inf,    SIZE=1000, RENAME=$(!UG_Filename)
  801. [Files-C320NT]
  802. 1,c320nt.sys , SIZE=46000
  803. [Files-C320TNT]
  804. 1,c320tnt.sys, SIZE=47000
  805.